package com.huirui.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huirui.server.pojo.entity.Order;
import com.huirui.server.pojo.vo.*;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;

/**
 * @author yujun
 * @description 针对表【t_order(订单表)】的数据库操作Mapper
 * @createDate 2025-09-27 11:27:55
 * @Entity com.huirui.server.pojo.entity.Order
 */
public interface OrderMapper extends BaseMapper<Order> {

    List<OrderConfirmVo> listConfirmProductInfo(@Param("ids") List<Long> ids);

    List<OrderResponseVo> getAllOrderList(
            @Param("userId") Long userId,
            @Param("offset") Long offset,
            @Param("pageSize") Long pageSize
    );

    List<OrderResponseVo> getPendingPaymentOrderList(
            @Param("userId") Long userId,
            @Param("offset") Long offset,
            @Param("pageSize") Long pageSize
    );

    List<OrderResponseVo> getPendingReceiptOrderList(
            @Param("userId") Long userId,
            @Param("offset") Long offset,
            @Param("pageSize") Long pageSize
    );

    List<OrderResponseVo> getFinishedOrderList(
            @Param("userId") Long userId,
            @Param("offset") Long offset,
            @Param("pageSize") Long pageSize
    );

    List<OrderResponseVo> getAfterSalesOrderList(
            @Param("userId") Long userId,
            @Param("offset") Long offset,
            @Param("pageSize") Long pageSize
    );

    List<OrderResponseVo> getPendingDeliveryOrderList(
            @Param("userId") Long userId,
            @Param("offset") Long offset,
            @Param("pageSize") Long pageSize
    );

    OrderDetailVo getOrderDetail(@Param("order_id") Long orderId);

    List<OrderVo> listOrderVo(
            @Param("orderIdList") List<Long> orderIdList
    );

    IPage<Long> listQueriedOrderId(
            @Param("orderType") Integer orderType,
            @Param("paymentMethod") Integer paymentMethod,
            @Param("status") Long status,
            @Param("beginTime") LocalDate beginTime,
            @Param("endTime") LocalDate endTime,
            @Param("searchCondition") Integer searchCondition,
            @Param("searchValue") String searchValue,
            IPage<Long> orderIdIpage
    );
    HighlyDetailedOrderDetailVo getHighlyDetailedOrderDetails(@Param("orderId") Long orderId);


}




